package backend.component;

import java.util.List;

public class RISCVglobalvar extends RISCVcomponent{
    public String GLOBAL = "\t.global\t";
    public String SECTION_RODATA = "\t.section .rodata\n\t.align 3\n";
    public String SECTION_DATA = "\t.data\n";
    public String SECTION_BSS = "\t.bss\n";
    public String TYPE = "\t.type\t%s,\t%s\n";
    public String SIZE = "\t.size\t%s,\t%s\n";
    public String WORD = "\t.word\t%d\n";
    public String ZERO = "\t.zero\t%d\n";

    public String name;
    public List<Integer> elements;
    public boolean isInit;
    public  int size;
    public  String getName(){
        return name;
    }
    public void setName(String name){
        if(name==null || name.isEmpty()){
            throw new IllegalArgumentException("Name Error");
        }
        this.name = name.substring(1);
    }
}
